package com.jmlee.service.impl;

import com.jmlee.mapper.AdminMapper;
import com.jmlee.mapper.FrontUserMapper;
import com.jmlee.pojo.Users;
import com.jmlee.service.FrontUserService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FrontUserServiceImpl implements FrontUserService {

    @Autowired
    private FrontUserMapper frontUserMapper;

    //==================================前台用户列表=================================================

    /**
     * 前台用户列表
     *
     * @author xl W
     * @date 2021/3/6 23:56
     */

    @Override
    public int selectUsersListCount(Users users) {
        return frontUserMapper.selectUsersListCount(users);
    }

    @Override
    public List<Users> selectUsersList(Users users, RowBounds rowBounds) {
        List<Users> usersList = frontUserMapper.selectUsersList(users, rowBounds);


        return usersList;
    }

    //用户管理 禁用
    @Override
    public boolean usersForbidden(Users users) {
        return frontUserMapper.usersForbidden(users);
    }

    //用户管理 启用
    @Override
    public boolean usersStart(Users users) {
        return frontUserMapper.usersStart(users);
    }

    //用户管理 重置密码
    @Override
    public boolean userChangePwd(Users users) {
        return frontUserMapper.userChangePwd(users);
    }
}
